package com.ccb.jyzx.expand.tiantouonline.view.response;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.List;

/**
 * @author XIEFEI
 * @date 2019-04-19 11:14
 * @Description 通用返回信息封装
 **/
@ApiModel(description= "返回响应数据")
public class SimpleResponseResult<T> implements Serializable {
    @ApiModelProperty(value = "是否成功")
    private boolean success=true;
    @ApiModelProperty(value = "错误编号")
    private Integer errCode;
    @ApiModelProperty(value = "错误信息")
    private String message;
    private T data;
    public SimpleResponseResult(){}

    public SimpleResponseResult(boolean success, Integer errCode, String message) {
        this.success = success;
        this.errCode = errCode;
        this.message = message;
    }
    public SimpleResponseResult(boolean success, Integer errCode, T data, String message) {
        this.success = success;
        this.errCode = errCode;
        this.message = message;
        this.data=data;
    }
    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public Integer getErrCode() {
        return errCode;
    }

    public void setErrCode(Integer errCode) {
        this.errCode = errCode;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}
